Skip to main content

VodaPay Inquire User Information

/v2/customers/user/inquiryUserInfo API

This API can be used by the Merchant to get the user details (Name, Email, Mobile Number) assosicated to the access token supplied in the request.

Vodapay uses a single sign-on authentication model, meaning that the user should only sign in to the VodaPay super app and not the Merchant's Mini Apps. The user information can be used to facilitate a seamless login in the Merchant's system.

tip

You can use the user information to check if the user already exists in your system.

  • If they already exists you can link them to an existing account.
  • If they don't, you can create an account for them and ask them for any additional information that you might need.
  • We recommend the use of a userId to identify a user, and not an email address or mobile number as these may be updated by the user at any time.
caution

Do not ask the user for any login password while on the VodaPay platform. Furthermore, when creating a new user it is recommended to use the users userID and not thier email or cellphone number.

VodaPay Inquire User Info Process

Query user information via an access token. The access token is generated via OAuth after authorization is successful.

  1. Merchant calls this interface with access token (Step 1)
  2. Wallet server returns user information the to merchant based on the access token (Step 2).

Request Attributes

  • accessToken <String(128) | Mandatory>: An access token that can be used to access the user resource scope.
  • authClientId <String(32) | Mandatory>: Merchant's Client ID.
  • extendInfo <String(4096) | Optional>: The extend information, wallets and Merchants can put extending information in this property.

Inquire User Info Sample code

POST
/v2/customers/user/inquiryUserInfo

Request Headers
{
"Content-Type": "application/json",
"Client-Id": "2021072719************",
"request-time": "2021-02-22T17:49:26.913+08:00",
"Signature":"algorithm=RSA256, keyVersion=1, signature=testing_signatur"
}
Request Body
{
"authClientId":"2021072719************",
"accessToken": "000000000220220913WR93nYXanS02uL00054453"
}

Response Attributes

  • result <Result | Mandatory>: The request result, which contains information related to the request result, such as status and error codes.
  • userInfo <User | Optional>: User open information.

Result process logic

For different request results, different actions are to be performed. See the following list for details:

  • If the value of result.resultStatus is S, that means user information inquiry is successful, merchant can use the accessToken to access the corresponding user resource scope.
  • If the value of result.resultStatus is F, that means user information inquiry is failed, the failed reason can refer to result code param.
  • If the value of result.resultStatus is U, that means unknown exception occur on wallet side, merchant may try again.

Result Statuses

  • S SUCCESS: Success.
  • U UNKNOWN_EXCEPTION: The API calling failed due to unknown reasons.
  • U REQUEST_TRAFFIC_EXCEED_LIMIT: The request traffic exceeds the limit.
  • F PROCESS_FAIL: A general business failure occurred. Don't retry.
  • F PARAM_ILLEGAL: Illegal parameters exist. For example, a non-numeric input, or an invalid date.
  • F ACCESS_DENIED: The access is denied.
  • F INVALID_API: The called API is invalid or not active.
  • F INVALID_ACCESS_TOKEN: The access token is invalid.
  • F INVALID_AUTH_CLIENT: The auth client id is invalid.
  • F EXPIRED_ACCESS_TOKEN: The access token is expired.
  • F EXPIRED_AGENT_TOKEN: The access token of mini program is expired.
  • F INVALID_AGENT_TOKEN: The access token of mini program is invalid.